package com.aorise.utils;

/**
 * @Auther: zhouhao
 * @Date: 2019/6/24
 * @Description: 进出城
 */
public enum IntoOutEnum {

    UNINVOLVED(1,"不涉及"),
    GOTOWN(2,"进城"),
    OUTTOWN(3,"出城");

    private Integer code;
    private String chinese;

    IntoOutEnum(Integer code, String chinese) {
        this.code = code;
        this.chinese = chinese;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getChinese() {
        return chinese;
    }

    public void setChinese(String chinese) {
        this.chinese = chinese;
    }

    /**
     * 判断值是否存在
     * @param str
     * @return
     */
    public static boolean isHas(String str){
        boolean bol =false;
        for (IntoOutEnum val : IntoOutEnum.values()){
            if(val.getChinese().equals(str.trim())){
                bol =true;
                break;
            }
        }
        return bol;
    }
}
